home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.arexx / comp.sys.amiga.programmer_2552_000003.msg < prev    next >
Encoding:
Internet Message Format  |  1994-11-27  |  2.8 KB

  1. Path: dd.chalmers.se!news.chalmers.se!sunic!pipex!howland.reston.ans.net!news.intercon.com!uhog.mit.edu!news.mtholyoke.edu!nic.umass.edu!ymir.cs.umass.edu!barrett
  2. From: barrett@cs.umass.edu (Daniel Barrett)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: HELP!!!  Arexx compiler or C?
  5. Date: 14 Dec 1993 00:15:02 GMT
  6. Organization: BLAZEMONGER INCORPORATED
  7. Lines: 56
  8. Distribution: world
  9. Message-ID: <2ej0i6INN68h@ymir.cs.umass.edu>
  10. References: <931209.82988.HALLEEN@delphi.com> <12DEC199301543405@loyola.edu>
  11. NNTP-Posting-Host: astro.cs.umass.edu
  12.  
  13. In article <12DEC199301543405@loyola.edu> mglicksman@loyola.edu (Michael `SLAM' Glicksman) writes:
  14. >I was wondering, does anyone do any serious programming in arexx? I'm a
  15. >Computer Science major...
  16.  
  17.     I would never use ARexx for a large project because the variable
  18. scoping is too weird.  All your variables are scoped to the bottom of the
  19. file, right into your subprograms, unless you use the "PROCEDURE" keyword to
  20. protect your subprograms.  But PROCEDURE/EXPOSE looks at the *dynamic* chain,
  21. not the static chain, to determine a variable's scope.  For example, suppose
  22. you want to protect function Funky, but let it access global variable G.  So
  23. you write:
  24.  
  25.         Funky: PROCECDURE EXPOSE G
  26.             ...stuff...
  27.                return G + 17
  28.  
  29. Looks fine, right?  Now suppose that function Another calls function Funky.
  30.  
  31.         Another: PROCEDURE
  32.             return Funky
  33.  
  34. Notice that function Another does not refer to the variable "G" at all.
  35. Well, tough luck!  You have to EXPOSE G anyway, because Funky needs it.
  36.  
  37.     Discovering this made me want to tear my hair out.
  38.  
  39.     Another lovely feature is the conflict between variable names
  40. and record field names.  If you have a record R with a field F, and you
  41. *also* have a variable named F, have fun!
  42.  
  43.     Yet another feature is that you can't partition your program into
  44. multiple files without incurring a performance hit.  Functions in other files
  45. get loaded from disk while running.  Darn.
  46.  
  47. >Oh, and there's been something that's been bugging the h*ll outta me for the
  48. >past few months: Is it possible to pass a group of compound variables to a
  49. >procedure?
  50. >      test.a = 1; test.b = 2; test.c = 3
  51. >      CALL printout(test)
  52.  
  53.     I believe you have to write:
  54.  
  55.         CALL printout(test.)        /* Notice the period */
  56.  
  57. Another difficulty of ARexx.
  58.  
  59.     I like ARexx as a scripting language and for its inter-program
  60. communication abilities.  It's mighty powerful for string handling.
  61. But for a large program?  No thanks.
  62.  
  63.                                                         Dan
  64.  
  65.  //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  66. | Dan Barrett -- Dept of Computer Science, Lederle Graduate Research Center |
  67. | University of Massachusetts, Amherst, MA  01003  --  barrett@cs.umass.edu |
  68.  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////
  69.